ZENKANA = [];
for(var i=0x30A1;i<=0x30FA;i++){
	ZENKANA.push(String.fromCharCode(i));
};

HANKANA = [];
for(var i=0xff66;i<=0xff9f;i++){
	HANKANA.push(String.fromCharCode(i));
};

HANKAKU = [];
for(var i=0x0021;i<=0x007E;i++){
	HANKAKU.push(String.fromCharCode(i));
};

ZENKAKU = [];
for(var i=0xFF01;i<=0xFF5E;i++){
	ZENKAKU.push(String.fromCharCode(i));
};

HIRAGANA = [];
for(var i=0x3041;i<=0x3096;i++){
	HIRAGANA.push(String.fromCharCode(i));
};

KATAKANA = [];
for(var i=0x30A1;i<=0x30F6;i++){
	KATAKANA.push(String.fromCharCode(i));
};

var HTMLTemplate = function(){};
HTMLTemplate.prototype =
{
	TABLEStr :
		"<table border='1' cellpadding='2' cellspacing='0'>"+
		"<!--TABLE_RULE_TEMP-->" +
		"</table>",
	drow : function(chars, func)
	{
		var html = this.TABLEStr;
		for(var i=0;i<chars.length/10;i++)
		{
			html = html.replace("<!--TABLE_RULE_TEMP-->",
				this.createTR(chars.slice(i*10, 10*i + 10), func)
			);
		};
		document.write(html);
	},
	createTR : function(chars, func)
	{
		var s, html = '<tr><td>変換前</td>';

		for(var i=0;i<chars.length;i++){
			html += '<td>'+ chars[i] + ':' + chars[i].charCodeAt(0).toString(16) +'</td>';
		};

		html += '</tr><tr><td>変換後</td>';

		for(var i=0;i<chars.length;i++){
			html += '<td>'+ chars[i][func]() + ':'+ chars[i][func]().charCodeAt(0).toString(16) + '</td>';
		};

		html += '</tr><tr><td>比較結果</td>';

		for(var i=0;i<chars.length;i++)
		{
			s = (chars[i] == chars[i][func]()) ? "×" : "○";
			html += '<td>'+ s +'</td>';
		};
		html += '</tr>';

		return html + '<!--TABLE_RULE_TEMP-->';
	}
};
